package com.ruicar.afs.cloud.admin.api.feign;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruicar.afs.cloud.admin.api.dto.UserSimpleInfoDto;
import com.ruicar.afs.cloud.common.core.query.QueryCondition;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "${com.ruicar.service-names.admin-server}",contextId = "sys-user-info")
public interface AfsUserFeign {

    @PostMapping("/user/getSimpleInfoByUserLoginNames")
    IResponse<List<UserSimpleInfoDto>> getSimpleInfoByUserLoginNames(@RequestBody List<String> usernames);

    @PostMapping("/user/getSimpleUserListByRoleCode/{roleCode}")
    IResponse<List<UserSimpleInfoDto>> getSimpleUserListByRoleCode(@PathVariable(name = "roleCode") String roleCode);

    @PostMapping("/user/pageQuerySimpleUserInfo")
    IResponse<Page<UserSimpleInfoDto>> pageQuerySimpleUserInfo(@RequestBody QueryCondition<UserSimpleInfoDto> queryCondition);
}
